package com.topscomm.main.config;

import com.topscomm.meet.utils.TencentMeetUtil;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
  * 腾讯会议配置开关
  * @author xinfushuo
  * @date 2023/4/18
  * @modify
  */
@Configuration
public class TencentConfig {
    /**
     * 是否开启腾讯会议打印日志
     */
    @Value("${tencent.meet.debug}")
    private boolean debugLog;
    /**
     * 是否开启腾讯会议
     */
    @Value("${tencent.meet.enable}")
    private boolean enable;

    @Bean
    public TencentMeetUtil tencentMeetUtil() {
        TencentMeetUtil tencentMeetUtil = new TencentMeetUtil();
        tencentMeetUtil.setDebugLog(debugLog);
        tencentMeetUtil.setEnabled(enable);
        tencentMeetUtil.init();
        return tencentMeetUtil;
    }
}
